﻿<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>

<head>
	<meta charset="UTF-8">
	<title>实践港站</title>
	<meta name="page-view-size" content="1280*720">
	<link rel="stylesheet" href="css/base.css">
	<link rel="stylesheet" href="css/A-doubleInfoDetail.css">
	<script type="text/javascript" src="lib/js/evm.js"></script>
	<script type="text/javascript" src="lib/js/Evm_djyw.js"></script>
	<script type="text/javascript" src="lib/js/key.js"></script>
	<script src="lib/js/md5.js" type="text/javascript" charset="utf-8"></script>
	<script src="lib/js/jquery-1.11.1.min.js" type="text/javascript" charset="utf-8"></script>
	<script src="lib/js/jquery.cookie.js" type="text/javascript" charset="utf-8"></script>
	<script src="js/api.js" type="text/javascript" charset="utf-8"></script>
	<script src="js/public.js" type="text/javascript" charset="utf-8"></script>
</head>

<body>
	<div class="theoretical-bg" id="helpMain">
		<div id="headerTitle" class="headerTitle"></div>
		<div class="containBar">
			<div class="shareContain" id="myShareBody">
				<div class="leftBar">
					<ul class="btnsBar" id="btnsBar">
						<!-- 左侧按钮 -->
					</ul>
				</div>
				<div class="rightBar" id="rightBar">
					<!-- 我的技能 -->
					<div class="rightSkill" id="rightSkill">
						<div class="skillBar" id="skill">
							<!-- 技能模块 -->
						</div>
					</div>
					<!-- 我的预约 -->
					<div class="rightAppoint" id="rightAppoint">
						<div class="appointBar">
							<img class="title" id="img">

							<div class="title t120" id="name">联系人：</div>
							<div class="title left441" id="nameBox">联系人</div>
							<div class="title t120" id="phone">联系方式：</div>
							<div class="title left441" id="phoneBox">110</div>
							<div class="title t120" id="time">开放时间：</div>
							<div class="title left441" id="timeBox">12：00</div>
							<div class="title t120" id="add">地址：</div>
							<div class="title left441" id="addBox">中心</div>

							<div class="title t120" id="content">服务功能:</div>


							<div class="rightListBar" id="rightListBar">
								<!-- 预约模块 -->
								<div class="rightList" id="rightList"></div>
							</div>
						</div>
					</div>
					<p class="pageShow"><span id="now_page">1</span>/<span id="total_page">1</span></p>
				</div>
			</div>
		</div>
	</div>

	</div>

</body>
<script>
	var areaName = '';
	var api = TV.GetParam("api") ? TV.GetParam("api") : "areaList";
	// debugger
	var modelIndex = {
		disUser: false, //显示头像
		index: 0, //导航栏初始位置
		menuPageSize: 6, //导航栏模块数量
		pageSize: 1, //主模块数量
		type: '',
		// structure: 2,//上下结构  默认1是左右，2是上下结构
		menuContainerId: 'btnsBar', //包含导航栏模块的标签id
		menuListName: 'leftBtn', //导航栏模块名称class
		mainContainerId: '', //包含主模块的标签id
		mainlistName: '', //主模块名称
		thisContain: 'rightListBar', //翻滚外容器
		thisDetail: 'rightList', //翻滚内容
		disModel: false,
	}
	var articleRun;
	var leftData = [{
		name: '大龙村', //name
		id: '2', //唯一标识
		type_style: '0', //类别
		size: '1', //数量
		list_name: 'rightList' //右侧模块classname
	}];
	var muenListData = [];

	function getMenus(page, number) {
		getleftdata(page, number)
		if (typeof number == 'number') {
			//				modelIndex.mainContainerId = leftData[number].list_name;
		}
	}

	function getleftdata(page, number) { //主动获取左侧列表，由于时延问题，暂时不用
		var params = {
			id: TV.GetParam("id"),
		}
		GetDatas(api, params, function (err, res) {
			// console.info(res)
			if (res.data.items == "" || res.data.items == null) {
				var str = '';
				str += '<div class="noneData"><img src=images/no.png></div>';
				$('#skill').html(str);
			} else {
				leftData = [];
				dataItem = res.data.items;
				for (var i = 0; i < dataItem.length; i++) {
					leftData.push({
						numbers: i, //name
						name: dataItem[i].title, //name
						id: dataItem[i].id, //唯一标识
						type_style: '0', //类别
						size: '1', //数量
						img: API_URL.imgURL + dataItem[i].img,
						contacts: dataItem[i].contacts,
						address: dataItem[i].address,
						content: dataItem[i].content,
						title: dataItem[i].title,
						mobile: dataItem[i].mobile,
						opentime: dataItem[i].opentime,
						list_name: 'rightList' //右侧模块classname
					});
				}
				left.paint(page, number);
			}

		});
	}

	function getMessage(id, page, pos, index) { //id,类型，页码，上下页，位置
		var workState = true;
		if (id == '1') {
			skillState = false; //技能
		} else {
			skillState = false; //预约
		}
		var thisToken = $.cookie('TV_CST_TOKEN');
		var param = {
			id: TV.GetParam('smallarea_id')
		}
		var params = {
			page: page,
			pagesize: modelIndex.pageSize,
			area_id: TV.GetParam('smallarea_id'),
			device: 'tv'
		}

		if (skillState) { //技能
			modelIndex.mainContainerId = 'skill'

		} else { //預約
			modelIndex.mainContainerId = 'rightListBar'

			$('.pageShow').css('display', 'none')
			$('#rightSkill').css('display', 'none');
			$('#rightAppoint').css('display', 'block');
			var str = '';

			var flag = $(".focus_menu").attr("data_number");

			$("#nameBox").html(leftData[flag].contacts);
			$("#phoneBox").html(leftData[flag].mobile);
			$("#timeBox").html(leftData[flag].opentime);
			$("#addBox").html(leftData[flag].address);
			$("#img").attr("src", leftData[flag].img);



			if (leftData[flag].content == "") {
				str += '<div class="noneData"><img src=images/no.png></div>';
			} else {
				str += '<div>';
				str += leftData[flag].content;
				str += '</div>'
			}

			$('#rightList').html(str);
			right.initialization();
		}
	}

	function direEnter(status, id, index) {
		console.log(status, id, index, 'sss', areaName)
	}
</script>
<script type="text/javascript" src="js/twoPageList.js"></script>

</html>